import request from '@/utils/request'

// 查询成本中心列表
export function listCostcenter(query) {
  return request({
    url: '/bomcostestimation/basedocument/costcenter/list',
    method: 'get',
    params: query
  })
}

// 查询成本中心详细
export function getCostcenter(id) {
  return request({
    url: '/bomcostestimation/basedocument/costcenter/' + id,
    method: 'get'
  })
}

// 新增成本中心
export function addCostcenter(data) {
  return request({
    url: '/bomcostestimation/basedocument/costcenter',
    method: 'post',
    data: data
  })
}

// 修改成本中心
export function updateCostcenter(data) {
  return request({
    url: '/bomcostestimation/basedocument/costcenter',
    method: 'put',
    data: data
  })
}

// 删除成本中心
export function delCostcenter(id) {
  return request({
    url: '/bomcostestimation/basedocument/costcenter/' + id,
    method: 'delete'
  })
}
